home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / cropmark / cropmark.tex < prev    next >
Text File  |  1992-03-04  |  6KB  |  155 lines

  1. %% Save file as: CROPMARK.TEX                   Source: FILESERV@SHSU.BITNET
  2. % Author: Peter Ungar <LAXA@ACFcluster.NYU.EDU>
  3. % CROPMARK MACROS FOR PLAIN TEX. Feb. 10, 1992 01:31 Peter Ungar 914 723 7187
  4. % Cropmarks are markings on pages intended to be phototypeset. They mark the
  5. % corners of the intended book page.
  6. % THE DIMENSION SPECIFICATIONS (\paperheight,\paperwidth, \topmargin,
  7. % \outsidemargin, \hsize, \vsize) SHOULD COME BEFORE THE MACROS. OTHERWISE
  8. % THE CROPMARKS GO INTO ODD LOCATIONS. THESE QUANTITIES ARE ASSIGNED VALUES
  9. % IN THIS FILE TO MAKE THE EXAMPLE WORK. REPLACE THE GIVEN VALUES BY THE
  10. % ONES YOU NEED BEFORE INSTALLING THE MACROS. HSIZE IS THE LENGTH OF THE LINES
  11. % AND VSIZE IS THE HEIGHT OF THE PRINTED PAGE NOT COUNTING HEADER OR FOOTER.
  12. % \lefttopcropmark should be inserted at the beginning of the
  13. % headline. It is a \llap and should not take space away from any other item
  14. % in the headline. \righttopcropmark should be at the end of the headline.
  15. % If there is no \hfil in the headline, use one to put the cropmark to
  16. % the end of the headline. It is a \rlap and in theory it should not take
  17. % space away
  18. % from other items. Do not to put a space in front of \righttopcropmark be-
  19. % cause the space will be typeset unless it is preceded by a control sequence.
  20. % The bottom cropmarks should be inserted in the beginning and end of the
  21. % \footline. Be sure to fill space in the middle with \hfil.
  22. % Remember that the \footline definition has to come BEFORE the end of the
  23. % first page.
  24. % The values of \voffset and \hoffset can be adjusted to try to push the
  25. % entire page including the cutmarks into the area your printer can print.
  26. % The quantities you have to input are
  27. % \paperheight, \paperwidth, \topmargin (measured from the top of the headline
  28. % which is assumed to be 10-point size, and \outsidemargin which will be the
  29. % right margin of odd-numbered pages and the left margin of even numbered
  30. % pages. The other quantities which are needed are computed by the macros.
  31. % The computations two empirical corrections.
  32. % If the dimensions on your printout are slightly off, try over or under-
  33. % stating the true dimensions of the above quantities.
  34. % The macros ought to work for all values of \hsize and \vsize but if these
  35. % are too large the cropmarks may not fit the area most printers can print.
  36. % \nocropmarks replaces the cropmark macros by \relax (blanks). The cropmarks
  37. % are needed only for phototypesetting and we may not want to see them on
  38. % printout prepared for other purposes.
  39. % TEX WILL NOT LET YOU KNOW IF YOU DID NOT ASSIGN A VALUE TO A DIMENSION.
  40. % THAT MAY BE THE REASON IF YOU GET BIZARRE RESULTS. THE VALUES MUST COME
  41. % BEFORE THE MACROS.
  42.  
  43. %\magnification 1042 %% Needed to get exact dimensions on the MacPlus screen.
  44.  
  45. \voffset=20mm\hoffset=15mm % Needed to bring cropmarks within printable area.
  46. \overfullrule=0mm  % To prevent overfullrules being added to cropmarks
  47. \newdimen\paperheight
  48. \newdimen\paperwidth
  49. \newdimen\topmargin
  50. \newdimen\outsidemargin
  51. \newdimen\insidemargin
  52. \newdimen\leftmargin
  53. \newdimen\rightmargin
  54. \newdimen\topliftadjustment
  55. \newdimen\bottomliftadjustment
  56. \newdimen\topcropmarklift
  57. \newdimen\bottomcropmarklift
  58. \newdimen\leftsideskip
  59. \newdimen\rightsideskip
  60. \newdimen\bclifta
  61. \newdimen\bcliftb
  62.  
  63. \vsize=182mm
  64. \hsize=112mm
  65. \paperheight=227.4mm     % These six quantities specify the margins.
  66. \paperwidth=152.3mm      % The ones introduced below are either
  67. \topmargin=14mm          % computed from these by the macros or they
  68. \outsidemargin=25mm      % are auxiliary.
  69.  
  70. \topliftadjustment=2.6mm
  71. \bottomliftadjustment=15.5mm
  72. \insidemargin=\paperwidth
  73. \advance\insidemargin by -\outsidemargin
  74. \advance\insidemargin by -\hsize
  75.  
  76. \def\leftorright{\ifodd\pageno
  77. \leftmargin=\insidemargin\rightmargin=\outsidemargin\else
  78. \leftmargin=\outsidemargin\rightmargin=\insidemargin\fi
  79. \leftsideskip=\leftmargin
  80. \advance\leftsideskip by -4.05mm
  81. \rightsideskip=\rightmargin
  82. \advance\rightsideskip by -4.05mm}
  83.  
  84. \def\lefttopcropmark{{\parindent=0mm\llap{\vtop{
  85. \hsize=\leftmargin
  86. \vskip-\topliftadjustment
  87. \vskip-\topmargin
  88. \vrule height 0.05mm depth 4mm width 0.05mm
  89. \vrule height 0.05mm depth0mm width 4mm
  90. \hfill}}}}
  91. \def\righttopcropmark{{\parindent=0mm\rlap{\vtop{\hsize=\rightmargin
  92. \vskip-\topliftadjustment
  93. \vskip-\topmargin
  94. \hfill
  95. \vrule height 0.05mm depth0mm width 4mm
  96. \vrule height 0.05mm depth 4mm width 0.05mm
  97. }}}}
  98.  
  99. \bottomcropmarklift=-\paperheight
  100. \advance\bottomcropmarklift by\topmargin
  101. \advance\bottomcropmarklift by\vsize
  102. \advance\bottomcropmarklift by\bottomliftadjustment
  103.  
  104. \bclifta=\bottomcropmarklift
  105. \advance\bclifta by 4mm
  106. \bcliftb=\bottomcropmarklift
  107. \advance\bcliftb by -0.05mm
  108.  
  109. \def\leftbottomcropmark{{\parindent=0mm\llap{
  110. \hbox{\vrule height\bclifta depth -\bottomcropmarklift width 0.05mm
  111. \vrule height \bottomcropmarklift depth -\bcliftb width 4mm
  112. \hskip\leftsideskip}}}}
  113.  
  114. \def\rightbottomcropmark{{\parindent=0mm\rlap{\hbox{\hskip\rightsideskip
  115. \vrule height \bottomcropmarklift depth -\bcliftb width 4mm
  116. \vrule height\bclifta depth -\bottomcropmarklift width 0.05mm}}}}
  117.  
  118.  
  119. \def\nocropmarks{\def\lefttopcropmark{\relax}  % THIS TURNS OFF CROPMARKS
  120. \def\righttopcropmark{\relax}
  121. \def\leftbottomcropmark{\relax}
  122. \def\rightbottomcropmark{\relax}}
  123. \endinput
  124.  
  125. % END OF THE MACROS.  AN EXAMPLE FOLLOWS. COMMENT OUT \endinput TO
  126. % TYPESET IT.
  127.  
  128. \headline={\leftorright\lefttopcropmark\ifodd\pageno
  129. \hfil HEADLINE\hfil\folio\else
  130. \folio\hfil HEADLINE\hfil \fi
  131. \righttopcropmark}
  132. \footline={\leftorright\leftbottomcropmark
  133. \hfil
  134. \rightbottomcropmark}
  135.  
  136. \noindent Topliftadjustment=2.6mm bottomliftadjustment=15.5mm
  137. \hfill H
  138.  
  139. \noindent paperheight=227.4mm  paperwidth=152.3mm
  140.  
  141. \noindent topmargin=14mm outsidemargin=25mm
  142.  
  143. \noindent vsize=182mm hsize=112mm
  144.  
  145. NOTE THAT THE DIMENSION SPECIFICATIONS MUST COME BEFORE THE MACROS.
  146. \vfill
  147. \noindent\line{Here is the bottom left corner. \hfil Bottom right is H}
  148. \eject
  149. \noindent\line{Here is the top left corner.\hfil Top right is H}
  150. \vfill
  151. \noindent\line{Here is the bottom left corner. \hfil Bottom right is H}
  152. \eject
  153. \end
  154.